<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php include(DDROOTPATH.'/cache/title/'.$pagetag.'_title.php');?>
<link href="template/<?=MOBAN?>/css/common.css" rel="stylesheet" />
<link href="template/<?=MOBAN?>/css/shai_u.css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="template/<?=MOBAN?>/js/jquery.js"></script>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/base64.js"></SCRIPT>
<SCRIPT type="text/javascript" src="template/<?=MOBAN?>/js/function.js"></SCRIPT>
</head>

<body>
<?php include(DDROOTPATH.'/template/'.MOBAN.'/header.tpl.php');?>
<?php include(DDROOTPATH.'/template/'.MOBAN.'/nav.tpl.php');?>
<div class="main">
  <table class="cat" border="0" >
    <tr>
      <td <?php if($catid==''){?> class="curcat"<?php }?>><a href="userbao<?=$url_head_id?><?=$userid?><?=$url_end?>">最新分享</a></td>
      <?php foreach($shaicat_arr as $k=>$v){?>
      <td <?php if($k==$catid){?> class="curcat"<?php }?>><a href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$k?><?=$url_head_xs?><?=$xs?><?=$url_head_page?>1<?=$url_end?>"><?=$v?></a></td>
      <?php }?>
    </tr>
  </table>
  <div class="space">
    <div class="space-left">
      <div class="avatar"><img onerror="this.src='images/noavatar_middle.gif'" src="upload/avatar/<?=get_avatar_filepath($userid, $size = 'middle')?>" /></div>
    </div>
    <div class="space-center">
      <div class="username">
          <table border="0">
  <tr>
    <td><span style="font-size:30px"><?=$info['ddusername']?></span></td>
    <td width="25" align="center"><div style="width:1px; height:30px; border-left:1px #666 dashed">&nbsp;</div></td>
    <td style="font-size:18px"><b style="font-family:'宋体'; color:#666666">晒单</b><b style="color:#FF6699; margin-left:10px"><?=$shai_nums?></b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b style="font-family:'宋体'; color:#666666">分享</b><b style="color:#FF6699; margin-left:10px"><?=$share_nums?></b></td>
  </tr>
</table>
      </div>
      <div class="goods-top">
      <ul>
        <li <?php if($xs=='all'){?> class="cur"<?php }?>><a href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$catid?><?=$url_head_xs?>all<?=$url_head_page?>1<?=$url_end?>">Ta的宝贝</a></li>
        <li <?php if($xs=='like'){?> class="cur"<?php }?>><a href="userbao<?=$url_head_id?><?=$userid?><?=WJT?'-':'&catid='?><?=$catid?><?=$url_head_xs?>like<?=$url_head_page?>1<?=$url_end?>">Ta的喜欢</a></li>
      </ul>
    </div>
    </div>
    <div class="space-right">
      <div style="border:#FF0099 1px solid; width:110px; height:28px; color:#FF6699;">
        <div style="margin-top:7px; margin-left:22px">
          <div style="float:left; height:19px; line-height:19px; font-size:16px">收到的</div>
          <div style=" width:16px" class="icon2"></div>
        </div>
      </div>
      <div style="border:#8C8C8C 1px dashed; border-top:0px; width:110px; height:44px; color:#FF3261; text-align:center; font-size:24px; font-weight:bold; line-height:44px"><?=$info['hart']?></div>
    </div>
    
  </div>
  <div style="height:2px; overflow:hidden; background:#F0F0F0">&nbsp;</div>
  <div class="good">
  <!-- 产品列表 开始 -->
    <div class="goods">
    <script type="text/javascript">
   /*$(document).ready(function(){
	h=new Array();
	l=new Array();
	h[0]=0;
	for(i=1;i<=4;i++){
		h[i]=$('#zhanxian_'+i).height();
		l[i]=h[i];
		if(h[i]<h[i-1]){
		    temp=h[i-1];
		    h[i-1]=h[i];
		    h[i]=temp;
		}
	}
	for(k=1;k<=4;k++){
	    if(l[k]<h[4]){
		    $('#zhanxian_'+k).append('<div class="zhanxian_list" style=" background:url(template/<?=MOBAN?>/images/0227.png);height:'+(h[4]-l[k]-10)+'px">&nbsp;</div>');
		}
	}
	});*/
		msg=new Array();
		msg[6]='您已经送过红心';
		msg[7]='登陆才能送红心哦';
		
		function likek(id){
			var user_hart=parseInt($("#x_"+id).text());
			$.post("a.php",{fun:'inc_hart',shai_id:id,xs:'share'},function(data){//alert(data);
				var data= eval("(" + data + ")");
				if(data.err==0){
					$("#x_"+id).text(user_hart+1);
				}
				else{
					alert(msg[data.msg]);
				}
			});
		};
    </script>
    <?php if(count($shaidan_arr)==0){?><div style="text-align:center; padding-top:20px; font-size:16px; color:#F00; font-weight:bold">暂无宝贝</div><?php }?>
    <div id="goods_list_img_u">
    <?php
	$shaidan_num=count($shaidan_arr);
	?>
    <?php for($j=0;$j<4;$j++){?>
    <div id="zhanxian_<?=$j+1?>" style="height:auto" class="zhanxian">
        <?php $k=$j+1; for($i=$k;$i<=$shaidan_num;$i=$i+4){$m=$i-1;?>
        <div class='zhanxian_list' style="height:auto" id="zhanxian_list_<?=$m?>">
          <li class="goods_list_img">
          <a class="img" target="_blank" href="baobei<?=$url_head_id?><?=$shaidan_arr[$m]['id']?><?=$url_end?>">
          <?=html_img($shaidan_arr[$m]['image'],$shaidan_arr[$m]['title'],'goods_list_img_i',200,'')?></a>
          <div class="pinglun">
             <div class="pinglun_s pinglun_s1" onclick="likek(<?=$shaidan_arr[$m]['id']?>)" style="cursor:pointer;" title="送红心"></div>
             <div class="pinglun_s pinglun_s2"></div>
             <div class="pinglun_s pinglun_s3" id="x_<?=$shaidan_arr[$m]['id']?>"><?=$shaidan_arr[$m]['hart']?></div>
             <div class="pinglun_s pinglun_s4"></div>
             <div class="pinglun_s pinglun_s5">
             <a class="img" style="margin-top:-13px; color:#fe5d9b; text-decoration:underline;" target="_blank" href="baobei<?=$url_head_id?><?=$shaidan_arr[$m]['id']?><?=$url_end?>#p">评论</a></div>
          </div>
          <div class="pinglun_r"></div>
          
          <div class="name" style="clear:both; width:100%; height:70px; overflow:hidden;">
          <div style="width:26px; height:26px; padding-top:8px; float:left; padding-right:5px; overflow:hidden;">
          <a href="userbao<?=$url_head_id?><?=$shaidan_arr[$m]['dduserid']?><?=$url_end?>">
          <img width="24" height="24" style="border:#ffaf9a 1px solid;" src="upload/avatar/<?=get_avatar_filepath($shaidan_arr[$m]['dduserid'], $size = 'small', $type = '')?>" />
          </a>
          </div>
          <div style=" width:150px; height:32px; padding-top:5px; line-height:16px; float:left; overflow:hidden;">
          <span style="font-size:12px; color:#e8876d;">由</span>
          <a style="color:#fe5dad;" href="userbao<?=$url_head_id?><?=$shaidan_arr[$m]['dduserid']?><?=$url_end?>"><?=$shaidan_arr[$m]['ddusername']?></a>
          <span style="font-size:12px; color:#e8876d;">分享</span><br />
          <span style=" color:#d5bba1; font-size:12px;"><?=date('m月d日 H:i',$shaidan_arr[$m]['time'])?></span>
          </div>
          <div class="comment" style="font-size:12px; color:#000; width:100%; height:25px; padding-top:5px; overflow:hidden;"><?=utf_substr(strip_tags($shaidan_arr[$m]['comment']),28)?></div>
          </div>
        </li>
        </div>
        <?php }?>
    </div>
    <?php }?>

    </div>
    
      
      <div class="megas512" style="text-align:center; margin-top:30px;"><?php pageft($total,$pagesize,1,0,0,10,$page_userbao);echo $pagenav;?></div>
    <div style="height:20px; width:100%"></div>
  </div>
  	<!-- 产品列表 结束 -->
  </div>
</div>
<div style="height:5px; width:100%"></div>
<?php include(DDROOTPATH.'/template/'.MOBAN.'/footer.tpl.php');?>
</body>
</html>
